<?php 

//  Copyright 2010 Ameoto Systems. All Rights Resurved.
//  Written by TheTooth, thetooth@ameoto.com

header("Content-Type: text/plain");
echo "running...\n\n";
error_reporting(E_ALL); 
ini_set("display_errors", 1);
include('include/init.php');
$parser = new Parser();
try {
	// Load config file and parse it
	$debug[0] = $parser->_read('lighttpd.conf');
	// Modify an option in memory
	$parser->varArray["server"]["modules"]["mod_redirect"] = true;
	// Compile and write the updated configuration file (to a different one so we don't break anything in this test :P)
	$debug[1] = $parser->_write('lighttpd.1.conf');
	var_dump($debug);
}catch(Exception $e){
	echo 'Caught exception: ',  $e->getMessage(), "\n";
}
?>